package task;

import java.util.Scanner;

public class Task4_8 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        factorial(n);
    }
    public static void factorial(int n){
        int sum = 1;
        for (int i = 1; i <= n; i++) {//n! = n* n - 1 *……*1
            sum = sum * i;
        }
        System.out.println(sum);
    }
}
